<iframe th:replace="common/top.html" width="100%" frameborder="0" scrolling="yes" class="x-iframe"></iframe>

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>添加订单</title>
    <link rel="StyleSheet" href="css/account.css" type="text/css" media="screen"/>
</head>
<body>
<h1 style="text-align: center">全部订单</h1>
<br>
<form th:action="@{/order/searchorder}" method="get">
    <label for="method">搜索内容：</label>
    <select id="method" name="method">
        <option value="userid">用户编号</option>
        <option value="orderid">订单编号</option>
        <option value="shipcity">寄送城市</option>
        <option value="shipcountry">寄送国家</option>
    </select>
    <input type="text" name="str" placeholder="查找……">
    <input type="submit" class="button">
</form>
<form th:action="@{/order/updateOrder}" method="get">
    <label for="method">修改订单：</label>
    <input type="text" name="orderid" placeholder="订单编号" required>
    <input type="submit" class="button">
</form>

<table>
<!--    <thead>-->
    <tr>
        <th>订单编号</th>
        <th>用户编号</th>
        <th>下单日期</th>
        <th>寄送地址</th>
        <th>账单地址</th>
        <th>派送员</th>
        <th>总价</th>
        <th>操作</th>
    </tr>
<!--    </thead>-->
<!--    <tbody>-->
    <tr th:each="order : ${orders}">
        <td th:inline="text">[[${order['orderId']?:''}]]</td>
        <td th:inline="text">[[${order['username']?:''}]]</td>
        <td th:inline="text">[[${order['orderDate']?:''}]]</td>
        <td th:inline="text">[[${order['shipAddress1']?:''}]],[[${order['shipAddress2']?:''}]],[[${order['shipCity']?:''}]],[[${order['shipState']?:''}]],[[${order['shipZip']?:''}]],[[${order['shipCountry']?:''}]]</td>
        <td th:inline="text">[[${order['billAddress1']?:''}]],[[${order['billAddress2']?:''}]],[[${order['billCity']?:''}]],[[${order['billState']?:''}]],[[${order['billZip']?:''}]],[[${order['billCountry']?:''}]]</td>
        <td th:inline="text">[[${order['courier']?:''}]]</td>
        <td th:inline="text">[[${order['totalPrice']?:''}]]</td>
        <td><a th:href="@{/order/deleteOrder(orderid=${order.orderId})}" onclick="return confirm('确认删除订单吗？')">删除</a></td>
    </tr>
<!--    </tbody>-->
</table>
</body>
</html>
